cmake_minimum_required(VERSION 3.10)
project(PortScan)

set(CMAKE_CXX_STANDARD 11)

add_executable(portscan 
    src/main.cpp
    src/utils.cpp
)

target_include_directories(portscan PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)

# 在 Windows 平台上链接 ws2_32 库
if(WIN32)
    target_link_libraries(portscan ws2_32)
endif()